package com.yincai.carefreewater.tool;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by $zhangke on 2017/5/16.
 *
 * 文件本地存储
 */

public class ShareTool {


    public  static void  saveInfo(Context context, String name, String value){
        SharedPreferences spf=context.getSharedPreferences(name, Context.MODE_PRIVATE);
        SharedPreferences.Editor  edit=spf.edit();
        edit.putString(name,value);
        edit.commit();
    }
    public  static String getInfo(Context context, String name){
        SharedPreferences spf=context.getSharedPreferences(name, Context.MODE_PRIVATE);
        SharedPreferences.Editor  edit=spf.edit();
        return  spf.getString(name,"");
    }

}
